home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple Developer Connection Student Program
/
ADC Tools Sampler CD Disk 3 1999.iso
/
Cool Demos, SDKs, & Tools
/
Demos⁄Tools⁄Offers
/
Eiffel for CW beta 3
/
EiffelS2
/
LIBRARY
/
MOTEL
/
Dialogs.c
< prev
next >
Wrap
Text File
|
1999-04-26
|
2KB
|
83 lines
/*------------------------------------------------------------------*/
/* Eiffel/S II MacOS Runtime */
/*------------------------------------------------------------------*/
/* Author : Ian Joyner */
/* Release : 1.0 */
/* Date : Dec. 1997 */
/* Copyright : Ian Joyner */
/*------------------------------------------------------------------*/
/********************************************************************/
/* */
/* DIALOGs */
/* */
/********************************************************************/
#include <Dialogs.h>
#include <Eiffel2.h>
INTEGER platform_dialog_port_size ()
{
DialogRecord p;
return (sizeof (p));
}
POINTER platform_NewDialog (void *wStorage, const Rect *boundsRect,
ConstStr255Param title, Boolean visible,
INTEGER procID, WindowPtr behind,
Boolean goAwayFlag, INTEGER refCon, Handle items)
{
DialogPtr dp;
Str255 scratch;
strcpy (scratch, title);
c2pstr ((char *)scratch); /* This might not be right if string is loaded from a resource */
dp = NewColorDialog (wStorage, boundsRect, scratch, visible, procID, behind,
goAwayFlag, refCon, items);
return (POINTER) dp;
}
POINTER platform_GetNewDialog (INTEGER dialogID, void *dStorage, WindowPtr behind)
{
DialogPtr dp;
dp = GetNewDialog (dialogID, dStorage, behind);
return (POINTER) dp;
}
INTEGER platform_ModalDialog ()
{
INTEGER16 itemHit;
ModalDialog (NULL, &itemHit);
return itemHit;
}
/********************************************************************/
/* */
/* ALERTs */
/* */
/********************************************************************/
INTEGER platform_alert (int id)
{
return (Alert (id, NULL));
}
INTEGER platform_caution_alert (int id)
{
return (CautionAlert (id, NULL));
}
INTEGER platform_note_alert (int id)
{
return (NoteAlert (id, NULL));
}
INTEGER platform_stop_alert (int id)
{
return (StopAlert (id, NULL));
}